<template>
  <div class="info-bar">
    <div class="infobar-item"><span>@源</span></div>
    <div class="infobar-item"><span>vuecli4.0实现抖音app</span></div>
    <div class="infobar-item music-item">
      <span class="iconfont icon-yinfu"></span>
      <div class="music-name">
        <span data-text="music">
        music</span></div></div>
  </div>
</template>
<script>
export default {
  
}
</script>
<style scoped>
.info-bar{
  color: #fff;
  font-size: 16px;
  padding-left: 10px;

}
.info-bar .infobar-item{
  padding: 5px, 0;
}
.icon-yinfu{
  margin-right: 5px;
}
.music-item{
  display: flex;
}
.music-item .music-name{
  width: 100px;
  white-space: nowrap;
  overflow: hidden;
}
.music-item .music-name span{
  display: inline-block;
  animation: scroll 4s linear infinite;
}
.music-item .music-name span::after{
  content: attr(data-text);
  margin-left: 40px;
}
@keyframes scroll {
  from{transform: translateX(0);}
  to{transform: translateX(calc(-50% - 20px));}
}
</style>